﻿using System;
using System.Data;
using System.Collections.Generic;
using Kingdee.BOS;

namespace KingdeeWebServiceProject.Data
{
    internal abstract class AbstractDatabase
    {
        /// <summary>
        /// 执行SQL语句
        /// </summary>
        /// <param name="SqlString">SQL语句</param>
        /// <return>返回影响记录行</return>
        internal abstract int Execute(string SqlString);

        /// <summary>
        /// 执行SQL语句（带参数）
        /// </summary>
        /// <param name="SqlString">SQL语句</param>
        /// <param name="lstSqlParams">SQL参数列表</param>
        /// <return>返回影响记录行</return>
        internal abstract int Execute(string strSql, List<SqlParam> lstSqlParams);

        /// <summary>
        /// 批量执行SQL语句
        /// </summary>
        /// <param name="lstSqlString">SQL语句列表</param>
        /// <return>返回影响记录行</return>
        internal abstract int ExecuteBatch(List<String> lstSqlString);

        /// <summary>
        /// 批量执行SQL语句（带参数）
        /// </summary>
        /// <param name="lstSqlObject">SQL语句列表</param>
        /// <return>返回影响记录行</return>
        internal abstract int ExecuteBatch(List<SqlObject> lstSqlObject);

        /// <summary>
        /// 执行查询语句，返回DataSet
        /// </summary>
        /// <param name="SqlString">SQL语句</param>
        /// <return>返回数据集DataSet</return>
        internal abstract DataSet ExecuteDateSet(string SqlString);

        /// <summary>
        /// 执行查询语句，返回DataSet
        /// </summary>
        /// <param name="SqlString">SQL语句</param>
        /// <param name="lstSqlParams">SQL参数列表</param>
        /// <return>返回数据集DataSet</return>
        internal abstract DataSet ExecuteDateSet(string SqlString, List<SqlParam> lstSqlParams);
    }
}
